﻿<Page 
    x:Class="PerspectiveDemo.Wpf3D.View.Bar3DImageDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:p="http://www.codeplex.com/perspective"
    Title="Bar3D + image"
    Style="{StaticResource PageStyle}">
    <Page.Resources>
        <ResourceDictionary Source="Wpf3DResources.xaml" />
    </Page.Resources>
    <p:Workshop3D>
        <p:Bar3D SideCount="6" RoundingRate="0.15" DefaultTextureMapping="True">
            <!--<p:Bar3D SideCount="6">-->
            <p:Bar3D.Material>
                <DiffuseMaterial>
                    <DiffuseMaterial.Brush>
                        <ImageBrush ImageSource="http://www.odewit.net/Perspective/Images/Tree.jpg" TileMode="None" Stretch="Fill"/>
                    </DiffuseMaterial.Brush>
                </DiffuseMaterial>
            </p:Bar3D.Material>
            <p:Bar3D.Transform>
                <Transform3DGroup>
                    <RotateTransform3D>
                        <RotateTransform3D.Rotation>
                            <AxisAngleRotation3D 
                            Angle="-90"
                            Axis="1,0,0" />
                        </RotateTransform3D.Rotation>
                    </RotateTransform3D>
                    <ScaleTransform3D ScaleY="4" />
                </Transform3DGroup>
            </p:Bar3D.Transform>
        </p:Bar3D>
    </p:Workshop3D>
</Page>
